package gov.pbc.nn.uflo.view;

import org.springframework.stereotype.Component;

import com.bstek.bdf2.core.view.frame.IFrameShortcutActionRegister;
import com.bstek.dorado.common.event.ClientEvent;
import com.bstek.dorado.view.widget.Container;
import com.bstek.dorado.view.widget.base.SimpleIconButton;

@Component
public class TaskListFrameShortcutActionRegister implements
		IFrameShortcutActionRegister {

	@Override
	public void registerToFrameTop(Container container) {
		SimpleIconButton button = new SimpleIconButton();
		button.setIcon("url(>skin>common/icons.gif) -200px -0px");
		button.setTip("待办任务");
		button.addClientEventListener("onClick", new ClientEvent() {

			@Override
			public String getScript() {
				String script = "window.top.openUrlInFrameTab('gov.pbc.nn.uflo.view.TodoTaskMaintain.d','待办任务','url(>skin>common/icons.gif) -200px -0px');";
				return script;
			}
		});
		container.setWidth("150px");
		container.addChild(button);
	}

	@Override
	public void registerToStatusBar(Container container) {
		// TODO Auto-generated method stub

	}

	@Override
	public boolean isDisabled() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int order() {
		// TODO Auto-generated method stub
		return 0;
	}

}
